  const sounds = ['applause','boo','gasp','tada','victory','wrong',]
  sounds.forEach(sound =>{
    // 创建一个button元素
    const btn = document.createElement('button')
    btn.classList.add('btn')

    btn.innerHTML = sound
    btn.addEventListener('click',()=>{
      stopSong()
      document.getElementById(sound).play()
    })
    // 给buttons添加一个族元素 btn
    document.getElementById('buttons').appendChild(btn)
  })
  function stopSong() { 
    sounds.forEach(sound=>{
      const song = document.getElementById(sound)
      song.pause()
      song.currenTime=0
    })

   }